This function lets you clean up documents, so that codes and scripts are clearer and work better. You can apply changes to a unique document or to several documents.
In the Tools menu, click on the option Code Optimizer.
The dialog box Code Optimizer opens. A unique document is selected by default.
To apply changes to several documents, click on the tab Several documents.
The top part of the dialog box offers different options, depending on whether you are working on a unique document or several documents.
Specify the optimization options you want to apply, according to the four tabs at the bottom:
Compression options: lets you clean up codes, deleting information that appears superfluous (e.g., comments).
Beauty options: lets you clean up the text, for e.g., by removing spaces or useless page breaks.
Special Characters: lets you convert the characters on your page into special characters, or vice versa.
File Conversions lets you convert the codes in your document.
3.
Click
on Start to display defined optimization options.
To stop this process, click on Stop. Note that
any changes made to codes will remain.
4. Click on Close to close the dialog box.
Click on Unique document in the dialog box.
Click on Open to select the document you want to modify.
To make a backup copy, click on Save and rename the file.
Specify the optimization options you want to apply, according to the four tabs at the bottom.
Click on Start to begin the optimization process.
1. Click on Several documents in the dialog box.
2. Define file options with the following parameters:
Backup modified files |
Activate this option to make backup copies of files before optimizing them. In this case, AceHTML generates as many files as there are optimizations, saving them with a .bak extension. |
Apply first on open files |
Check this box to give priority to open files. This option should be used to do a search on several files (for example, files in a directory or project). |
Apply to: |
|
Specified files |
This option lets you modify only the selected files. Activating this option will transform the dialog box. Click on Add to select the files you want to modify. Click on Restore to erase all previously selected files. |
Search all files in project |
This option lets you modify all the files in a project. The files must be open before you can start the optimization process. This option is only available if the file belongs to a project, and the latter is open. |
Search in directories |
This option lets you modify all the files in a specific directory. |
Search Options |
This zone is refreshed according to the type of search specified, thereby allowing you to select the appropriate files, projects and directories. |
Directory to Search |
This option is displayed when you choose the Search in directories option. In the field, select the directory containing the files to be modified. |
Search in all documents opened |
This option lets you modify only those files opened in AceHTML. When you select this option, the Search Options zone is disabled. |
Include subdirectories |
This option is displayed when you choose the Search in directories option. Checking this box will apply the changes to all files and subdirectories in the selected directory. |
File masks |
Select the type of file to which you want to apply a filter. Modifications will only be done on files corresponding to the selected mask. |
Specify the optimization options you want to apply, according to the four tabs at the bottom.
Click on Start to begin the optimization process.
This tab lets you define options that can clean up your document by deleting certain items that are not useful until you are at the page editing stage.
Compression options only apply to items in your Edit Window, and do not change how the browser displays your document.
Strip Carriage Returns (#10 and #13) |
Check this box to delete all empty lines from the Edit Window. The sub-options are then activated:
|
Strip Tabs |
Check this box to delete all indents from the Edit Window. |
Strip HTML Comments |
Check this box to delete all comment lines (preceded by the tag <- - comment - - >). |
Strip Extra Spaces |
Check this box to delete all space characters from the Edit Window, thereby leaving only one space between words and codes. |
Strip Script Comments |
Check this box to delete all comments on special scripts included in the document (preceded by the tag <!-- start of script and ending with // end of script -->). |
Custom Remove |
Check this box to delete code you have created. Example: to identify document sections. Nearby zones are activated when this box is checked:
|
Skip ASP/PHP tags |
Check this box to skip document sections created with ASP or PHP scripts. |
Strip HTML tags |
Check this box to delete all HTML tags in the document. This function is useful when you want to ensure there are no HTML tags in a document in a language other than HTML (JS, ASP, PHP). |
Skip HTML tags |
Skips HTML tags. This function is useful when the optimized document was created using several languages. |
This tab lets you define options to improve the esthetics of your document in the Editor window. Having a clean, well laid out document at the editing phase will make it easier for you to find information.
Strip Carriage Returns more than: |
To ensure all paragraphs in the document are evenly spaced, check this box and indicate how many carriage returns (or line returns) you want. All extra carriage returns will be deleted. |
Strip Spaces more than: |
To ensure consistency as to spaces between words, check this box and indicate how many spaces you want. All extra spaces will be deleted. |
Strip Spaces after EOL |
Check this box to delete all extra spaces at the end of text lines. |
Align Code with Tabs |
Check this box to ensure visual balance of the document, through tabs in front of line blocks. Nearby zones are activated when this box is checked:
|
Convert HTML to XHTML |
Check this box to convert all document tags and codes to XHTML. Checking this box will activate the adjacent box:
|
Tags in lowercase |
Check this box to convert the case of characters in tags. All recognized tags with characters in upper or mixed case (upper and lower) will be transformed into lower case. |
Attributes in lowercase |
Check this box to convert the case of characters in attributes. All recognized tag attributes with characters in upper or mixed case (upper and lower) will be transformed into lower case. |
Quote attribute values |
Check this box to add quotation marks to all attribute values. |
This command lets you convert all special characters (Θ, α, ε, etc.) in the HTML code document. This command is particularly useful for Web designers creating sites for use on older browser versions. For more recent versions (as of versions 4 of Internet Explorer or Netscape), this command is not necessary.
Conversion of special characters |
If your Edit Window includes special characters, check this box to convert normal characters into special characters. |
Return to normal characters |
If your Edit Window includes special characters, check this box to convert to convert them into normal characters. |
Special characters in decimal numbers |
This option lets you display all special characters in decimals. Example: The character Θ = é, a special character, becomes é, a special character in decimals. |
Text in comments will not be affected by this conversion.
Example of normal characters converted into special characters
This special character tab lets you enter the characters directly in the Editor window.
This tab lets you modify the case of certain document codes, as well as modify the direction of separators.
Convert to lower case Convert to upper case |
The case modification is applied to the identification accompanying a tag attribute. For example, all of a document's align="center" attributes can be automatically converted: align="CENTER". Activate the option corresponding to the conversion you want to do. |
Separator Conversion |
All separator conversion options are disabled by default. You can command the automatic conversion of all separators in your document, according to whether your site will be on a local network or server.
None of these conversions modify the document itself. |
Attributes to check |
lets you select the attributes to be converted.
|